Ext.define('TS.model.rp.RpBillModel',{
	extend: 'Ext.data.Model',
	fields: [
		{name: 'rpBillId',type: 'int'},
		{name: 'rpBillCode',type: 'string'},
		{name: 'rpBillType',type: 'int'},
		{name: 'rpBillName',type: 'string'},
		{name: 'billDate',type: 'date'},
		{name: 'funcDate',type: 'date'},
		{name: 'direct',type: 'int'},
		{name: 'custSuppId',type: 'int'},
		{name: 'deptId',type: 'int'},
		{name: 'empId',type: 'int'},
		{name: 'makerId',type: 'int'},
		{name: 'amount',type: 'float'},
		{name: 'discount',type: 'float'},
		{name: 'checkAmount',type: 'float'},
		{name: 'checkStatus',type: 'int'},
		{name: 'fyear',type: 'int'},
		{name: 'period',type: 'int'},
		{name: 'archived',type: 'boolean'},
		{name: 'remark',type: 'string'},
		{name: 'settleAmount',type:'float'},
		{name: 'currentCheckAmount',type: 'float'}
	],
	associations:[
	        	  {type: 'hasOne',model: 'TS.model.base.CustomerModel',associatedName:'customer',associationKey:'customer'},
	        	  {type: 'hasOne',model: 'TS.model.base.DeptModel',associatedName: 'dept',associationKey:'dept'},
	        	  {type: 'hasOne',model: 'TS.model.base.EmpModel',associatedName: 'emp',associationKey:'emp'},
	        	  {type: 'hasOne',model: 'TS.model.base.EmpModel',associatedName: 'maker',associationKey:'maker'}
	        	],
	 hasMany:{model:'TS.model.rp.RpBillDetailModel',name:'details',associationKey:'details'}
});